# @Time : 2021/5/30 14:07
# @Author : Li Kunlun
# @Description : 进化算法环境配置测试-pytorch_py3.7环境.下面没有图形展示，但是有图形展示对应的html语句，需要使用jupyter

import numpy as np  # for multi-dimensional containers
import pandas as pd  # for DataFrames
import plotly.express as px  # plotly express
import plotly.graph_objects as go  # for data visualisation
import plotly.io as pio  # to set shahin plot layout

# Optional Customisations
pio.templates['shahin'] = pio.to_templated(go.Figure().update_layout(
    legend=dict(orientation="h", y=1.1, x=.5, xanchor='center'),
    margin=dict(t=0, r=0, b=40, l=40))).layout.template
pio.templates.default = 'shahin'
pio.renderers.default = "notebook_connected"  # remove when running locally

tips = px.data.tips()
fig = px.histogram(tips, x="total_bill", color="sex")
fig.show()
